essentialsdocsfandomcom-20200214-history
Roaming Pokémon
This page describes how roaming Pokémon roam. It explains how to define where and when a roaming Pokémon can go. Roaming Pokémon Roaming Pokémon is the term given to Pokémon, typically legendaries, that randomly appear as wild encounters every so often, rather than appear as an event encounter. They will flee from battle at the earliest opportunity (but will fight if they cannot). Roaming Pokémon can travel between different maps. If a roaming Pokémon is on the same map as the player, then the player may encounter that roaming Pokémon. Defining the roaming locations Roaming Pokémon can be encountered on various different maps, but the pattern they roam in is not entirely random. Each map that a roaming Pokémon can be on will lead to one or more other maps, and the roamer will move to one of those (chosen at random) each time the player steps onto a new map. The paths between maps can be quite a complex pattern. Paths are defined in the script section Settings, in the hash RoamingAreas, e.g. RoamingAreas = { 20 => 22, 21 => 22, 22 => 21 } In this example, a roaming Pokémon on map 20 can go to either map 21 or map 22, and so on. Map 20 is the path to maps 21 and 22. When defining paths, it is important that there are no dead ends - any map that can be reached should be a path to at least one other map. You should only make a map a path if it is reasonable that a roaming Pokémon will show up there. For example, land-based Pokémon shouldn't be able to go on a water route. On the other hand, you can make a map a path even if there cannot be a wild encounter on it, and even if the map doesn't exist at all. As mentioned below, these paths are the "default" paths. If a roamer has no paths of its own, it will use these ones. Defining the roamers Roaming Pokémon are listed in the script section Settings, in an array called RoamingSpecies: RoamingSpecies = [ 30, 36, 0, "002-Battle02x", 30, 36, 0, "002-Battle02x", 40, 37, 2, nil, { 2 => [21,31, 21 => 2,31,69, 31 => 2,21,69, 69 => 21,31 }], 40, 38, 1, nil ] Each line corresponds to one roaming Pokémon, where the information in each line is as follows: # Its species. # Its level. # A Game Switch number. # The kind of encounters the roamer can appear in - one of: #* 0 - Walking in grass, walking in caves or surfing. #* 1 - Walking in grass or walking in caves. #* 2 - Surfing. #* 3 - Fishing. #* 4 - Surfing or fishing. # The name of a BGM file to play during the encounter. # A set of roaming paths unique to this roamer. A Pokémon will only start roaming if its Game Switch is ON. Several roaming Pokémon can depend on the same Game Switch. Roamers that do not have any paths defined specifically for them will use the default paths mentioned above. If the roamer has its own roaming paths, they should be laid out as in the example above. You can use unique paths to make sure a roamer will appear only where you want it to, e.g. in just one region, or only on one island/cave. It is recommended that you do this if you have multiple regions, to make sure the roamer stays in the intended region. Roaming behaviour Roaming Pokémon only move to a different map when the player enters a new map. Roamers cannot move to the last 2 maps that the player has visited (not including the new map). In addition to the paths as mentioned above, there is a small chance that the roamer will go to any other map it could possibly ever visit. If a roamer doesn't have any valid destinations, then it will remain on its current map until it can move again. If the player has a partner trainer, they will never encounter a roaming Pokémon. There is a 25% chance that any wild Pokémon encounter will be with a roamer on the current map, unless the player has already encountered a roamer on that map. The player can only encounter one roamer per map, regardless of how many roamers are currently on that map. Different maps in the same region with the same name (e.g. ones depicting long routes) are considered to be the same map for the purpose of encountering a roamer. Once a roaming Pokémon has been encountered, it will remain the exact same Pokémon in all subsequent encounters (i.e. with same personal ID/health/shininess/moveset/IVs/etc.). Its information is stored in the array $PokemonGlobal.roamPokemonindex. When a roaming Pokémon is defeated/captured, it can no longer be encountered. Resetting roamers The method pbResetAllRoamers will erase the information of all fainted roamers that had not been caught. This starts them roaming again (assuming their Game Switches are still ON), as fresh Pokémon with new properties.